// mysql_result() function is used to pull a single value from the database $value = mysql_result(mysql_query("SELECT value FROM table WHERE condition = 'met'"), 0);